<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    :root {
      --backgroundColor: 20;
    }
    p {
      background-color: red;
    }
    /* 此时会推算为background-color: transparent;而不是red生效；他不能提前失效，此时已经把其他级联的样式给忽略掉了；此时会去找initial的初始值 */
    p {
      background-color: var(--backgroundColor);
    }
  </style>
</head>
<body>
  <p>
    this is a test
  </p>
</body>
</html>